/*
 * Copyright (C) 2004, Velocityme Partnership
 * DurationFormat.java
 *
 * Created on 01 January 2004, 06:40
 */

package com.velocityme.utility;

/**
 *
 * @author  Robert Crida Work
 */
public class DurationFormat {
    
    public static String formatDuration(long p_duration_msec) {
        StringBuffer durationStringBuffer = new StringBuffer();
        long minutes = (p_duration_msec / 60000L) % 60L;
        long hours = p_duration_msec / 3600000L;
        durationStringBuffer.append(hours);
        durationStringBuffer.append("h:");
        if (minutes < 10)
            durationStringBuffer.append('0');
        durationStringBuffer.append(minutes);
        durationStringBuffer.append('m');
        return durationStringBuffer.toString();
    }
}
